package common;

/**
 * @description:
 * @author: yangxuan10
 * @create: 2024-05-23 14:32
 **/
public class ArrayGenerate {

    /**
     * 字符串转int类型数组
     * @param strArray 1,2,3
     * @return [1,2,3]
     */
    public static  int[] strConvertIntArray(String strArray) {
        if (strArray == null || strArray.length() == 0) {
            return new int[]{};
        }
        String[] split = strArray.split(",");
        int[] intArray = new int[split.length];
        for (int i = 0; i < split.length; i++) {
            intArray[i] = Integer.parseInt(split[i]);
        }
        return intArray;
    }

}